// const { exec } = require("child_process");
import { exec } from "child_process";
const projects = [
  { name: "first", path: "./src/first" },
  { name: "second", path: "./src/second" },
  // Add more projects as needed
];

projects.forEach((project) => {
  exec(
    `tsc --watch --project ${project.path}`,
    (error: any, stdout: any, stderr: any) => {
      if (error) {
        console.error(`Error watching ${project.name}: ${error}`);
        return;
      }
      console.log(`${project.name} is being watched and compiled.`);
    }
  );
});
